{include file="head" title="内容修改" /}
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header">MRO大数据</div>
        <div class="layui-card-body" style="padding: 15px;">
            <form id="form" class="layui-form" action="" style="width:80%;">

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">用户数量:</label>
                        <div class="layui-input-inline">
                            <input type="number" name="users_total" value="{$data.a|default=''}" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">活跃用户:</label>
                        <div class="layui-input-inline">
                            <input type="number" name="users_active" value="{$data.a|default=''}" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>

                <br>
                <br>

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">产品总量:</label>
                        <div class="layui-input-inline">
                            <input type="number" name="products_total" value="{$data.a|default=''}" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">投放总量:</label>
                        <div class="layui-input-inline">
                            <input type="number" name="products_use" value="{$data.a|default=''}" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>


                <br>
                <br>

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">全国城市量:</label>
                        <div class="layui-input-inline">
                            <input type="number" name="citys_total" value="{$data.a|default=''}" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">覆盖城市量:</label>
                        <div class="layui-input-inline">
                            <input type="number" name="citys_cover" value="{$data.a|default=''}" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>


                <br>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">机床总数:</label>
                        <div class="layui-input-inline">
                            <input type="number" name="machines_total" value="{$data.a|default=''}" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">机床接入数:</label>
                        <div class="layui-input-inline">
                            <input type="number" name="machines_use" value="{$data.a|default=''}" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>

                <br>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">企业总数:</label>
                        <div class="layui-input-inline">
                            <input type="number" name="companys_total" value="{$data.a|default=''}" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>


                <br>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">总收入(￥):</label>
                        <div class="layui-input-inline">
                            <input type="number" name="income_total" value="{$data.a|default=''}" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>


            </form>
        </div>
    </div>
</div>

<script>
    layui.config({
        base: '{$Think.const.admin_tpl}/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'upload', 'laydate'], function () {
        var $ = layui.$
            , layer = layui.layer
            , laydate = layui.laydate
            , upload = layui.upload
            , form = layui.form;

        $('.layui-input').bind('change',function () {

            $.ajax({
                url:'/admin/mros/contents_submit',
                type: 'post',
                data:{
                    name:$(this).attr('name'),
                    value:$(this).val()
                },
                dataType: 'json',
                success: function (data) {
                },
            })

        });

        var data = JSON.parse('<?=$data?>');
        $('.layui-input').each(function (k,v) {
            v.value = data[v.name] ? data[v.name] : 0;
        })
    });
</script>
{include file="foot" /}
